package com.foreknow.trains.train4;

public class Hero extends ActionCharacter implements CanSwim,CanFly {
    String name;

    public Hero(String name){
        this.name=name;
    }

    @Override
    public void fight(String emp) {
        System.out.println(name+"和"+emp+"战斗");
    }

    @Override
    public void fly() {
        System.out.println(name+"飞");
    }

    @Override
    public void swim() {
        System.out.println(name+"游泳");
    }
}
